package com.zhku.user.controller;

import com.zhku.base.model.RestResponse;
import com.zhku.user.model.dto.UpdateUserRoleDto;
import com.zhku.user.model.po.TtUserRole;
import com.zhku.user.service.TtUserRoleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@Api(value = "用户角色相关接口",tags = "用户角色相关接口")
@RestController
public class TtUserRoleController {

    @Autowired
    TtUserRoleService ttUserRoleService;

    @ApiOperation("修改用户所属角色接口")
    @PostMapping("/role/updateUserRole")
    public RestResponse updateUserRole(@RequestBody UpdateUserRoleDto updateUserRoleDto){
        ttUserRoleService.updateUserRole(updateUserRoleDto);
        return RestResponse.success();
    }
}
